/**
 * 
 */
package io.finer.erp.jeecg.stock.service;

import org.jeecg.common.api.vo.Result;

import com.alibaba.fastjson.JSONObject;

import io.finer.erp.jeecg.bas.entity.BasMaterial;
import io.finer.erp.jeecg.stock.vo.ScanIO;
import io.finer.erp.jeecg.stock.vo.ScanInventory;

/**
 * @author duanyong
 * 扫码出入库service接口
 *
 */
public interface IScanService {
	/**
	 * @Description 出入库操作
	 * @param code
	 * @param operType
	 * @param number
	 * @param userId
	 * @param result
	 * @return
	 * Create at: 2020-08-20 15:53:19
	 * @author: duanyong
	 * Revision:
	 *    2020-08-20 15:53:19 - first revision by duanyong
	 *        
	 */
	Result<JSONObject> inAndOut(ScanIO scanIo, Result<JSONObject> result);
	
	/**
	 * @Description 获取仓库信息
	 * @param userId 用户ID
	 * @param result
	 * @return
	 * Create at: 2020-08-20 15:53:34
	 * @author: duanyong
	 * Revision:
	 *    2020-08-20 15:53:34 - first revision by duanyong
	 *        
	 */
	Result<Object> findWarehouse(String userId, Result<Object> result);
	
	
	/**
	 * @Description 扫码盘点
	 * @param list
	 * @return
	 * Create at: 2020-08-21 15:48:46
	 * @author: duanyong
	 * Revision:
	 *    2020-08-21 15:48:46 - first revision by duanyong
	 *        
	 */
	Result<Object> inventory(ScanInventory inventory, Result<Object> result);

	/**
	 * @Description 查询客户
	 * @param userId
	 * @param result
	 * @return
	 * Create at: 2020-08-22 16:25:06
	 * @author: duanyong
	 * Revision:
	 *    2020-08-22 16:25:06 - first revision by duanyong
	 *        
	 */
	Result<Object> findCustomer(String userId, Result<Object> result);
	
	/**
	 * @Description 查询物料分类
	 * @param userId
	 * @param result
	 * @return
	 * Create at: 2020-09-18 14:35:53
	 * @author: duanyong
	 * Revision:
	 *    2020-09-18 14:35:53 - first revision by duanyong
	 *        
	 */
	Result<Object> getMaterial(String userId, Result<Object> result);
	
	/**
	 * @Description 查询单位
	 * @param userId
	 * @param result
	 * @return
	 * Create at: 2020-09-18 14:35:44
	 * @author: duanyong
	 * Revision:
	 *    2020-09-18 14:35:44 - first revision by duanyong
	 *        
	 */
	Result<Object> getUnit(String userId, Result<Object> result);
	
	/**
	 * @Description 查询供应商
	 * @param userId
	 * @param result
	 * @return
	 * Create at: 2020-09-18 14:35:33
	 * @author: duanyong
	 * Revision:
	 *    2020-09-18 14:35:33 - first revision by duanyong
	 *        
	 */
	Result<Object> getSupplier(String userId, Result<Object> result);
	
	/**
	 * @Description 根据生产订单查询工序
	 * @param orderId 订单ID
	 * @return
	 * Create at: 2020-09-30 15:56:41
	 * @author: duanyong
	 * Revision:
	 *    2020-09-30 15:56:41 - first revision by duanyong
	 *        
	 */
	Result<?> getProcedure(String orderId);

	/**
	 * @Description 物料生产出库时检查物料及参数正确
	 * @param scanIo
	 * @return
	 * Create at: 2020-10-20 13:26:49
	 * @author: duany
	 * Revision:
	 *    2020-10-20 13:26:49 - first revision by duany
	 *        
	 */
	Result<?> materialCheck(ScanIO scanIo);

	/**
	 * @Description 托盘操作
	 * @param scanIo
	 * @return
	 * Create at: 2020-10-24 14:28:41
	 * @author: duany
	 * Revision:
	 *    2020-10-24 14:28:41 - first revision by duany
	 *        
	 */
	Result<?> tray(ScanIO scanIo);

	/**
	 * @Description 出货操作
	 * @param scanIo
	 * @return
	 * Create at: 2020-10-24 14:28:31
	 * @author: duany
	 * Revision:
	 *    2020-10-24 14:28:31 - first revision by duany
	 *        
	 */
	Result<?> shipment(ScanIO scanIo);

	/**
	 * @Description 根据物料编码查询销售出库单
	 * @param materialCode
	 * @return
	 * Create at: 2020-10-24 14:27:50
	 * @author: duany
	 * Revision:
	 *    2020-10-24 14:27:50 - first revision by duany
	 *        
	 */
	Result<?> getSaleOutBill(String materialCode);

	/**
	 * @Description 根据编号查询物料，如果物料表中没有，则从物料临时表中查询
	 * @param code
	 * @return
	 * Create at: 2020-11-20 10:42:09
	 * @author: duany
	 * Revision:
	 *    2020-11-20 10:42:09 - first revision by duany
	 *        
	 */
	BasMaterial getMaterialByCode(String code);
}